//
//  Network+Order.m
//  AFNetworking
//
//  Created by admin on 2020/6/3.
//

#import "Network+Order.h"

@implementation Network (Order)
#pragma mark - 自提点订单卖家确认收货（二维码/取件码）
/// @param orderId  订单id（提货码提货必传）
/// @param code 密码 提货码（提货码提货必传 不区分大小写）
/// @param qrcode 接口回调 二维码（二维码提货必传）
-(void)sellerReceipt:(nullable NSString *)orderId code:(nullable NSString *)code qrcode:(nullable NSString*)qrcode block:(NetworkEndBlock)endblock{
    NSString *url = [NSString stringWithFormat:@"%@/SelProduct/sellerReceipt",BASEURL];
    NSMutableDictionary *param = [NSMutableDictionary new];
    if (orderId) {
        [param setValue:orderId forKey:@"orderId"];
    }
    if (code) {
        [param setValue:code forKey:@"code"];
    }
    if (qrcode) {
        [param setValue:qrcode forKey:@"qrcode"];
    }
    
    NSString *token =  [NSString stringWithFormat:@"Bearer%@",[UserInfo share].token] ;

    [self sendPost:url param:param head:@{
        @"Authorization":token
    } block:endblock];
}

#pragma mark - 手动触发订单结算事件）

-(void)accountsOrderBlock:(NetworkEndBlock)endblock{
    NSString *url = [NSString stringWithFormat:@"%@/order/accountsOrder",BASEURL];
       NSMutableDictionary *param = [NSMutableDictionary new];
     
       
       NSString *token =  [NSString stringWithFormat:@"Bearer%@",[UserInfo share].token] ;

       [self sendPost:url param:param head:@{
           @"Authorization":token
       } block:endblock];
}
@end
